package com.trkj.dao.cf;

import java.util.List;

import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.trkj.pojo.Course;
import com.trkj.pojo.StaffInformation;
import com.trkj.vo.cf.CourseVo;

public interface CourseDAO extends CrudRepository<Course, Long> {
	@Query("select c,s from Course c inner join c.staffInformation s where s.stainName like ?1 or s.stainId like ?1")
	List<Object[]> courseQuery(String stainName,Pageable p);
	@Query("select s,l from StaffInformation s inner join s.laborTurnovers l where l.voluntaryTurnover=0")
	public List<Object[]> findAll3();
}
